package com.opensource.struts2.actions.utils;

import java.util.HashMap;
import java.util.Map;

import com.opensymphony.xwork2.ActionSupport;

public class DemoJsonAction extends ActionSupport {
	
	private Map resultInfo;

	public Map getResultInfo() {
		return resultInfo;
	}

	public String getTestJSON() {

		resultInfo = new HashMap();
		resultInfo.put("status", "SUCCESS");
		resultInfo.put("code", "202");
		resultInfo.put("infoMSG", "DemoJsonAction 数据获取成功");
		
		Map data = new HashMap();
		data.put("name", "Tanis Chan");
		data.put("email", "chenhjcs@163.com");
		resultInfo.put("data", data);
		
		return SUCCESS;
	}
	
}
